package cn.xyh.dao;

import cn.xyh.model.User;

import java.util.List;


public interface UserWriteMapper {


    /**
     * 新增
     */
    public Integer insertUser(User entity) throws Exception;


    /**
     * 删除多个
     */
    public Integer delUserByIds(String[] ids) throws Exception;

    /**
     * 删除
     */
    public Integer delUser(long id) throws Exception;


    /**
     * 修改
     */
    public int updateUser(User entity) throws Exception;

    /**
     * 根据ID查找对象
     */
    public User getUserById(long userId) throws Exception;


    /**
     * 根据Code查找对象
     */
    public User getUserByCode(String code) throws Exception;


    /**
     * 根据名称查找对象
     */
    public User getUserByName(String name) throws Exception;


    /**
     * 根据多种条件查找列表总数
     */
    public Integer getUserCount(User entity) throws Exception;


    /**
     * 根据多种条件查找列表
     */
    public List<User> getUserList(User entity) throws Exception;

}

